---
title: Expressive Code Twoslash
description: Add TypeScript Twoslash code examples with the Expressive Code Twoslash plugin.
template: splash
editUrl: false
hero:
  tagline: A plugin to add TypeScript Twoslash code examples
  image: 
    alt: Twoslash Logo
    file: ../../assets/twoslash.png
  actions:
    - text: Get started
      link: /getting-started/installation
      icon: right-arrow
    - text: Star on GitHub
      link: https://github.com/Matthiesenxyz/ec-plugins
      icon: star
      variant: minimal
---

import { Tabs, TabItem } from '@astrojs/starlight/components';

```ts twoslash
// @errors: 2540

console.log((1 + 2 + 3 + 4).toFixed(2))
//                            ^|

/** A Basic Todo interface*/
interface Todo {
  title: string;
}

const todo: Readonly<Todo> = {
  title: 'Delete inactive users',
//  ^?
}

todo.title = 'Hello'
```